<?php
session_start();
include 'db.inc.php';
$email = $_POST['email'];
$pwd = $_POST['pwd'];
$mysqli=mysqli_connect($hostname, $username, $password, $db);


$query = "SELECT * FROM Customers WHERE customerEmail='$email' AND password='$pwd'";
$result = mysqli_query($mysqli,$query)or die(mysqli_error());
$num_row = mysqli_num_rows($result);
		$row=mysqli_fetch_array($result);
		if( $num_row >=1 ) {
			echo 'true';
			$_SESSION['user_name']=$row['customerEmail'];
			$_SESSION['customerId']=$row['customerId'];
		}
		else{
			echo 'false';
		}
?>